import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import 'normalize.css'
// import './assets/main.css'
// import ElementPlus from 'element-plus'
// import 'element-plus/dist/index.css'
const app = createApp(App)
    // app.use(ElementPlus)
app.use(router)
app.use(store)
    //定义一个全局自定义指令然后实现按钮级别的权限控制
    // const app = createApp({})


app.directive('addadmindirective', (el, binding) => {
    //获取组建的权限，根据权限设置按钮是否禁用 
    console.log('元素', el);
    console.log('参数', binding);
    if (binding.value == 2) {
        el.disabled = false
    } else {
        el.disabled = true
            // el.style.background = 'gray';
        el.style.display = 'none'
    }
})

app.mount('#app')